import request from '@/utils/request'
import {param} from "@/utils";

// 查询巡检列表
export function listPlace(query) {
  return request({
    url: '/inspection/place/list', method: 'get', params: query
  })
}

// 查询巡检详细
export function getPlace(id) {
  return request({
    url: '/inspection/place/' + id, method: 'get'
  })
}

// 新增巡检
export function addPlace(data) {
  return request({
    url: '/inspection/place', method: 'post', data: data
  })
}

// 修改巡检
export function updatePlace(data) {
  return request({
    url: '/inspection/place', method: 'put', data: data
  })
}

// 删除巡检
export function delPlace(id) {
  return request({
    url: '/inspection/place/' + id, method: 'delete'
  })
}

export function listProvince() {
  return request({
    url: '/region/listProvince', method: 'get'
  })
}

// 获取市数据
export function listCitiesByProvinceCode(query) {
  return request({
    url: '/region/listCitiesByProvinceCode', method: 'get', params: query
  })
}

// 获取区数据
export function listAreasByCityCode(query) {
  return request({
    url: '/region/listAreasByCityCode', method: 'get', params: query
  })
}
